1. Field of the Invention
The present invention relates to an image encoding method, image decoding method, moving-image compression method, moving-image expansion method, image encoding program, image encoding device, image decoding device, image encoding/decoding system, and extended image compression/expansion system, which subject still images or moving images to encoding for compression, or/and subject them to decoding for expansion.
2. Description of the Related Art
In the information processing field, various types of techniques for compressing data have been developed. Of data, particularly with regard to image data, examples of well-known compression techniques include JPEG, JPEG 2000, and the like for still images, and MPEG, MPEG 2, MPEG 4, and the like for moving images.
For example, the aforementioned compression with JPEG is described in CCIT Recommendations T.81, “Information technology—digital compression and coding of continuous-tone still images—requirements and guidelines”, ITU, 1992. Nevertheless, the outline of JPEG process will be explained for convenience.
Taking a color image as an example, first, the image made up of three colors (a luminance signal Y, and two color-difference signals Cb and Cr, for example) is divided into 8×8 pixel blocks for each color respectively. Next, the pixel block of the luminance signal Y and each pixel block of the two color-difference signals Cb and Cr are transformed into frequency space using DCT (Discrete Cosine Transform) individually (i.e., three times). Subsequently, the DCT coefficients of respective pixel blocks are quantized with a luminance signal quantization table or a color-difference signal quantization table (common to Cb and Cr), and entropy encoded with a luminance signal Huffman table or a color-difference signal Huffman table (common to Cb and Cr).
JPEG 2000 for compression of still image data is still not popular in spite of improvements of conventional JPEG (such as scalability of reversible/non-reversible compression/image quality, reduction of mosquito noise, and the like, for example). JPEG is considered to survive as the first candidate of techniques to be employed for image compression in the future.
Now, the number of image pickup pixels used in digital cameras or cellular phones has markedly increased in recent years. Moreover, familiar apparatuses (apparatuses frequently continuously being carried with) represented by cellular phones and the like have been widely used, thereby increasing opportunity for photographing, and also increasing the number of digital images possessed by individuals. Clearly then, the amount of image data should be preferably small for the sake of handling such increase in the amount of information.
However, with the conventional JPEG, the only way to reduce the size of compressed image data is to employ a coarser quantization table, i.e., to enlarge the quantization width. It is well known, that this will enhance the aforementioned mosquito noise and the like, and consequently deteriorates image quality.
Heretofore, techniques for preventing such noise from occurring even when a compression ratio is set high have been proposed.
For example, with Japanese Unexamined Patent Application Publication No. 2000-308058, a technique has been described wherein mosquito noise, which readily occurs on an edge portion of an image, can be reduced by performing pre-processing so as to reduce signal level difference in the edge portion of the image prior to JPEG procession.
Also, with Japanese Unexamined Patent Application Publication No. 8-163375, a technique has been described wherein a pixel block is divided into multiple regions according to a pixel value distribution, scarce pixels are compensated for each divided region so as to obtain each pixel block size, and each pixel block is subjected to the JPEG conversion.
However, with the technique described in the aforementioned Japanese Unexamined Patent Application Publication No. 2000-308058, it is necessary to store information related to the pre-processing of the edge portion of the image prior to the JPEG encoding on the device side which performed this pre-processing, and accordingly, the original image cannot be reproduced from the compressed image file alone. Moreover, with the pre-processing, the entire pixel blocks of image data are subjected to low-bit conversion, so that quantization error increases, and consequently, image quality deteriorates.
Also, because the technique described in the aforementioned Japanese Unexamined Patent Application Publication No. 8-163375 generates multiple pixel blocks from a single pixel block, an attempt to perform decoding processing with a conventional JPEG decoder will cause error and the processing cannot be done.
As just described, a compression format that enables decoding in outline a compressed image file alone with a JPEG decoder, and thereby perform compression with a small amount of codes even if quantization table is set fine, or thereby prevent mosquito noise even if the quantization table is set coarse, has not been provided.
The present invention has been made in light of the aforementioned situation, and it is an object of the present invention to provide, with respect to encoding methods using spatial frequency transformation, an image encoding method, image decoding method, moving-image compression method, moving-image expansion method, image encoding program, image encoding device, image decoding device, image encoding/decoding system, and extended image compression/expansion system, which can reduce the amount of codes and/or can suppress noise and/or can subject coded data to decoding.